using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class DC_ClinicalNotesMap : EntityTypeConfiguration<DC_ClinicalNotes>
    {
        public DC_ClinicalNotesMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Note)
                .HasMaxLength(5000);

            // Table & Column Mappings
            this.ToTable("DC_ClinicalNotes");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Note).HasColumnName("Note");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Toothnb).HasColumnName("Toothnb");
            this.Property(t => t.PatIID).HasColumnName("PatIID");
            this.Property(t => t.CN_CreatedON).HasColumnName("CN_CreatedON");
            this.Property(t => t.CN_CreatedBy).HasColumnName("CN_CreatedBy");
            this.Property(t => t.CN_Void).HasColumnName("CN_Void");
            this.Property(t => t.CN_Saved).HasColumnName("CN_Saved");
            this.Property(t => t.CN_ApprovedBy).HasColumnName("CN_ApprovedBy");
            this.Property(t => t.CN_ApprovedOn).HasColumnName("CN_ApprovedOn");
        }
    }
}
